import { RadioGroupProps } from 'ant-design-vue'

import { SelectOptions } from '@/components/HeaderSearch/index.vue'

export type TaskStatus = '' | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

export type TaskStatusItem = {
  status: TaskStatus
  name: string
  title: string
  isError: boolean
}

export const schemeOptions = [
  {
    label: '全部方式',
    value: ''
  },
  {
    label: '去近似',
    value: 1
  },
  {
    label: '去模糊',
    value: 2
  }
]

export const taskStatusList: TaskStatusItem[] = [
  {
    status: 1,
    name: '数据准备中..',
    title: '数据准备中',
    isError: false
  },
  {
    status: 2,
    name: '数据准备失败',
    title: '数据准备失败',
    isError: true
  },
  {
    status: 3,
    name: '清洗中..',
    title: '清洗中',
    isError: false
  },
  {
    status: 4,
    name: '清洗成功',
    title: '清洗成功',
    isError: false
  },
  {
    status: 5,
    name: '清洗失败',
    title: '清洗失败',
    isError: true
  },
  {
    status: 6,
    name: '清洗超时',
    title: '清洗超时',
    isError: true
  },
  {
    status: 7,
    name: '待解析',
    title: '待解析',
    isError: false
  },
  {
    status: 8,
    name: '解析中..',
    title: '解析中',
    isError: false
  },
  {
    status: 9,
    name: '待清洗',
    title: '待清洗',
    isError: false
  }
]
export const getTaskStatusItem = (status: TaskStatus): TaskStatusItem => {
  return taskStatusList.find(item => item.status === status)!
}

export const taskTypeArr: SelectOptions[] = [{ value: 1, label: '图像数据' }]

export const radioOptions: RadioGroupProps['options'] = [
  { label: '宽松', value: 'low' },
  { label: '默认', value: 'medium' },
  { label: '精准', value: 'high' }
]
